package com.zenghm.retrofit2.adapter;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

import retrofit2.CallAdapter;
import retrofit2.Retrofit;

/**
 * @author zenghm
 */
public class PojoCallAdapterFactory extends CallAdapter.Factory {

    public static PojoCallAdapterFactory create() {
        return new PojoCallAdapterFactory();
    }

    private PojoCallAdapterFactory() {
    }

    @Override
    public CallAdapter<?, ?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) {
        return new PojoCallAdapter<>(returnType);
    }
}
